#include <bits/stdc++.h>
using namespace std;
int n,dino[100001],m=0;
int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    cin>>n;
    int a=n;
    for(int i=1;i<=n;i++){
        cin>>dino[i];}
    for(int j=1;j<=n;j++)
    for(int r=j;r<=n;r++){
        if(dino[r]>dino[j-1]){
        swap(dino[r],dino[j-1]);}
        }

    for(int s=1;s<n;s++){
        if(dino[a-1]==dino[a-2]) a--;
    else {m=m+1;
    a--;}
    }
cout<<n-m;

return 0;
}







